export const context = {
  setDataSourceConfig: (config: DataSourceConfig) => {
    localStorage.setItem("data-source-config", JSON.stringify(config));
  },
  getDataSourceConfig: (): DataSourceConfig => {
    const config = localStorage.getItem("data-source-config");
    return config ? JSON.parse(config) : {};
  },

  setDefaultPkg: (pkg: string) => {
    localStorage.setItem("default-pkg", pkg);
  },
  getDefaultPkg: (): string => {
    return localStorage.getItem("default-pkg") || "";
  },
};
